package com.iflytek.universitymanagement.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.iflytek.universitymanagement.domain.Comment;
import com.iflytek.universitymanagement.mapper.CommentMapper;
import com.iflytek.universitymanagement.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;

@Service
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements CommentService {


    @Autowired
    private CommentMapper commentMapper;

    @Override
    public List<Comment> getAllComments() {
        return commentMapper.selectList(null);
    }

    @Override
    public void addComment(Comment comment) {
        commentMapper.insert(comment);
    }
}

